﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt.mysql
{
	// Token: 0x02000157 RID: 343
	public class TMySQLLoopStmt : TBlockSqlStatement
	{
		// Token: 0x06000B9C RID: 2972 RVA: 0x003065C7 File Offset: 0x003047C7
		public TMySQLLoopStmt(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstmysqlloopstmt;
		}

		// Token: 0x06000B9D RID: 2973 RVA: 0x003065DB File Offset: 0x003047DB
		internal override void buildsql()
		{
		}

		// Token: 0x06000B9E RID: 2974 RVA: 0x003065DD File Offset: 0x003047DD
		internal override void clear()
		{
		}

		// Token: 0x06000B9F RID: 2975 RVA: 0x003065DF File Offset: 0x003047DF
		internal override string getasprettytext()
		{
			return "";
		}

		// Token: 0x06000BA0 RID: 2976 RVA: 0x003065E6 File Offset: 0x003047E6
		internal virtual void iterate(TVisitorAbs pvisitor)
		{
		}

		// Token: 0x06000BA1 RID: 2977 RVA: 0x003065E8 File Offset: 0x003047E8
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			TLoopSqlNode tloopSqlNode = (TLoopSqlNode)this.rootNode;
			base.doParseStatement(psql);
			tloopSqlNode.Stmts.doParse(this, ESqlClause.unknown);
			for (int i = 0; i < tloopSqlNode.Stmts.size(); i++)
			{
				this.BodyStatements.add(tloopSqlNode.Stmts.getStatementSqlNode(i).Stmt);
			}
			return 0;
		}

		// Token: 0x06000BA2 RID: 2978 RVA: 0x00306653 File Offset: 0x00304853
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000BA3 RID: 2979 RVA: 0x00306663 File Offset: 0x00304863
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			this.BodyStatements.accept(v);
			v.postVisit(this);
		}
	}
}
